<template>
  <div class="login">
    <form class="from">
      <p class="title">请登录</p>
      <div class="from-box">
        <div>
          <input
            type="text"
            placeholder="请输入用户名"
            v-model="username"
            style="outline: medium"
          />
        </div>

        <div class="password">
          <input
            type="password"
            placeholder="请输入密码"
            v-model="password"
            style="outline: medium"
          />
        </div>
        <button class="btn" @click="login">登录</button>
      </div>
    </form>
  </div>
</template>

<script>
export default {
  name: "login",
  data() {
    return {
      password: "",
      username: "",
    };
  },
  methods: {
    login() {
      this.$router.push("/profile");
    },
  },
};
</script>

<style>
.login {
  width: 100vw;
  height: 100vh;
  background: url("~@/assets/images/cart/login.jpg") no-repeat;
  background-size: cover;
  background-position: center center;
}
.from {
  width: 100vw;
  height: 300px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* background-color: #ff5c7c; */
}
.title {
  text-align: center;
  font-size: 24px;
  color: #ff5c7c;
  padding: 10px;
}
.from-box {
  margin-top: 20px;
}
.from input {
  margin-left: 10%;
  width: 80%;
  height: 30px;
  border: none;
  border-bottom: 1px solid #ff5c7c !important;
  /* border-radius: 10px; */
  background: transparent;
}
.password {
  margin-top: 20px;
  margin-bottom: 40px;
}
.btn {
  width: 80%;
  border-radius: 10px;
  height: 50px;
  margin-left: 10%;
  color: #fff;
  background-color: #ff5c7c;
  border: none;
}
</style>